package com.msb.user.exception;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import lombok.extern.slf4j.Slf4j;

/**
 * @program: microservices
 * @ClassName CommonException
 * @description:
 * @author: slfang
 * @create: 2024-01-04 10:18
 * @Version 1.0
 **/
@Slf4j
public class CommonException {

    public static String fallback(Integer id ,Throwable e){
        log.error("出现业务异常");
        return "出现业务异常";
    }
    public static String handleException(Integer id , BlockException e){
        log.error("触发限流机制");
        return "触发限流机制";
    }
}
